//
//  YBUserModel.swift
//  Moonlight
//
//  Created by Penlon Kim on 2024/1/1.
//  Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
//

import UIKit

// MARK: - 用户登录model
class YBUserModel: BaseModel, Codable {
    enum Gender: Int {
        case man = 1
        case female
        case unknow
    }
    
    enum UserType: Int {
        case client = 0
        case designCloud = 3
        case association = 4
        case build = 5
        case gameCloud = 6
    }
    
    var age: Int = 0
    var avatar: String = ""
    var company: String = ""
    var dept: String = ""
    var deviceId: String = ""
    var devicessType: String = ""
    var email: String = ""
    var expireTime: String = ""
    var gender: Int = 0
    var id: String = ""
    var machineType: Int = 0
    var mdev: String = ""
    var mobile: String = ""
    var nickName: String = ""
    var openid: String = ""
    var position: String = ""
    var promoCode: String = ""
    var realName: String = ""
    var remark: String = ""
    var source: String = ""
    var spreadUid: String = ""
    var state: Int = 0
    var userName: String = ""
    var userType: Int = 0
    var orderInfoVos: [YBOrderInfoVosModel] = []
    
    var _gender: Gender {
        return Gender(rawValue: gender) ?? .unknow
    }
    
    var _userType: UserType {
        return UserType(rawValue: userType) ?? .client
    }
    
}
